package cn.qn.enums;

/**
 * APP用户状态
 */
public enum AppUserStatusEnum {

    NORMAL("1", "正常"),
    LOCKED("0", "锁定");

    private String code;

    private String desc;

    private AppUserStatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDesc(String code) {
        for (AppUserStatusEnum enums : AppUserStatusEnum.values()) {
            if (enums.getCode().equals(code)) {
                return enums.getDesc();
            }
        }
        return "未知";
    }
}
